home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1999 March / EnigmA AMIGA RUN 35 (1999)(G.R. Edizioni)(IT)[!][issue 1999-03].iso / earcd / devel / libx11 / amigax_proto.h < prev    next >
C/C++ Source or Header  |  1999-01-01  |  4KB  |  142 lines

  1. /* Copyright (c) 1996 by Terje Pedersen.  All Rights Reserved   */
  2. /*                                                              */
  3. /* By using this code you will agree to these terms:            */
  4. /*                                                              */
  5. /* 1. You may not use this code for profit in any way or form   */
  6. /*    unless an agreement with the author has been reached.     */
  7. /*                                                              */
  8. /* 2. The author is not responsible for any damages caused by   */
  9. /*    the use of this code.                                     */
  10. /*                                                              */
  11. /* 3. All modifications are to be released to the public.       */
  12. /*                                                              */
  13. /* Thats it! Have fun!                                          */
  14. /* TP                                                           */
  15. /*                                                              */
  16.  
  17. /***
  18.    NAME
  19.      amigax_proto
  20.    PURPOSE
  21.      prototypes for amigaX specific functions
  22.    NOTES
  23.      
  24.    HISTORY
  25.      Terje Pedersen - Feb 17, 1995: Created.
  26. ***/
  27.  
  28. #ifndef AMIGAX_PROTO
  29. #define AMIGAX_PROTO
  30.  
  31. #ifdef __cplusplus
  32. extern "C" {
  33. #endif
  34.  
  35. extern struct RastPort *setup_win(Window win);
  36. extern void setup_gc(GC gc);
  37. extern void initfonts(void);
  38. extern void swapwbcm(int,ULONG *);
  39. extern void savewbcm(void);
  40. extern void Xfreecursors(void);
  41.  
  42. extern void clear_subwin(Window,int,int);
  43. extern void clip_begin(int,int,int,int);
  44. extern void clip_exclude(int,int,int,int);
  45.  
  46. extern int defaultfontwidth(void);
  47. extern int defaultfontheight(void);
  48.  
  49. extern void CloseDownScreen(void);
  50. extern int SetupScreen(int width,int height,int depth,ULONG id);
  51. extern void CloseDownScreen(void);
  52. extern void CloseBackdropWindow(void);
  53. extern int OpenBackdropWindow(int,int,int,int);
  54. extern Window AmigaCreateWindow(int,int,int,int,ULONG);
  55. extern int OpenLibraries(void);
  56. extern void CloseLibraries(void);
  57. extern void report_display(void);
  58. extern void force_exit(int);
  59. extern int open_timer(void);
  60. extern void close_timer(void);
  61. extern void init_backrp(void);
  62.  
  63. extern struct BitMap *alloc_bitmap(int width,int height,int depth,int flags,struct BitMap *pFriend );
  64. extern int free_bitmap(struct BitMap *bmp);
  65.  
  66. #define CHILDRENAVAIL 100
  67.  
  68. #ifndef         S_ISDIR         /* missing POSIX-type macros */
  69. #define       S_ISDIR(mode)   (((mode)&S_IFMT) == S_IFDIR)
  70. #define       S_ISBLK(mode)   (((mode)&S_IFMT) == S_IFBLK)
  71. #define       S_ISCHR(mode)   (((mode)&S_IFMT) == S_IFCHR)
  72. #define       S_ISREG(mode)   (((mode)&S_IFMT) == S_IFREG)
  73. #endif
  74. #ifndef         S_ISFIFO
  75. #  ifdef        S_IFIFO
  76. #    define     S_ISFIFO(mode)  (((mode)&S_IFMT) == S_IFIFO)
  77. #  else
  78. #    define     S_ISFIFO(mode)  0
  79. #  endif
  80. #endif
  81. #ifndef         S_ISLINK
  82. #  ifdef        S_IFLNK
  83. #    define     S_ISLINK(mode)  (((mode)&S_IFMT) == S_IFLNK)
  84. #  else
  85. #    define     S_ISLINK(mode)  0
  86. #  endif
  87. #endif
  88. #ifndef         S_ISSOCK
  89. #  ifdef        S_IFSOCK
  90. #    define     S_ISSOCK(mode)  (((mode)&S_IFMT) == S_IFSOCK)
  91. #  else
  92. #    define     S_ISSOCK(mode)  0
  93. #  endif
  94. #endif
  95.  
  96. #include <stdio.h>
  97. /*
  98. #include <memwatch.h> To enable memlib, you must #define MWDEBUG to 1 
  99. */
  100.  
  101. #define X11WINDOW 1
  102. #define X11BITMAP 2
  103. #define X11SUBWINDOW 3
  104. #define X11MUI 4
  105. #define X11ROOT 5
  106.  
  107. extern char *X11Drawables,*X11DrawablesBackground;
  108. extern int *X11DrawablesSubWindows;
  109. extern GC *X11GC;
  110. extern int *X11DrawablesMap,*X11DrawablesWindowsInvMap;
  111. extern int X11NumDrawables,X11NumDrawablesWindows,X11NumDrawablesBitmaps;
  112. extern int X11NumDrawablesSubWindows,X11NumGC,X11AvailGC;
  113. extern long *X11DrawablesMask;
  114. extern int X11NumMUI;
  115. extern Cursor *X11DrawablesMUICursor;
  116.  
  117. typedef struct {
  118.   int x,y,width,height;
  119.   int depth;
  120.   int parent;
  121.   char background;
  122.   char mapped;
  123.   Cursor cursor;
  124.   Window win;
  125.   char *name;
  126.   Pixmap pixmap;
  127. } _ActualWindow;
  128.  
  129. extern _ActualWindow *X11ActualWindows;
  130.  
  131. extern void X11AddInternal(Window,int,int);
  132. extern void X11AddInternalEvent(Window,int,int);
  133. extern void stackcheck(int);
  134. extern char *getdisplayname(ULONG);
  135. extern int get_intuievent(XEvent *event);
  136. void X11ScanFile(FILE *fp);
  137. #ifdef __cplusplus
  138. }
  139. #endif
  140.  
  141. #endif /* AMIGAX_PROTO */
  142.